﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:PhotoPuzzle"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="PhotoPuzzle.GameInterface"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	SupportedOrientations="Landscape" Orientation="LandscapeLeft"
	shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="ANI_Starting">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="pictrueshow">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="pictrueshow">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:1">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="ANI_End">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="pictrueshow">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="pictrueshow">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:1">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="textBlock">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<BackEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="textBlock">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<BackEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="button">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Collapsed</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
				<DiscreteObjectKeyFrame KeyTime="0:0:1">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>

	<Grid x:Name="LayoutRoot">
		<Grid.Background>
			<ImageBrush Stretch="Fill" ImageSource="Res/background.jpg"/>
		</Grid.Background>
		
		
		<!--TitlePanel contains the name of the application and page title-->

		<!--ContentPanel - place additional content here-->
		<Image Source="Res/main.png" Stretch="Fill" d:IsLocked="True"/>
		<Ellipse x:Name="buttonBack" Fill="#3FFFFFFF" HorizontalAlignment="Right" Margin="0,217,0,220" Width="44"/>
		<Grid Margin="50,40,44,40">
			<Grid.Background>
				<RadialGradientBrush>
					<GradientStop Color="#FF392414" Offset="1"/>
					<GradientStop Color="#FF23130B"/>
				</RadialGradientBrush>
			</Grid.Background>
		</Grid>
		<Image HorizontalAlignment="Right" Height="128" Source="Res/help.png" Stretch="Fill" VerticalAlignment="Top" Width="130" MouseLeftButtonDown="help_Click"/>
		<Canvas x:Name="Tiles" HorizontalAlignment="Left" Height="400" VerticalAlignment="Top" Width="700" Margin="50,40,0,0"/>
		<Image x:Name="pictrueshow" Margin="50,40" Stretch="Fill" Width="700" Height="400"/>
		<Image x:Name="btnHelpButton" HorizontalAlignment="Right" Height="47" Source="Res/help.png" Stretch="None" VerticalAlignment="Top" Width="130" MouseLeftButtonDown="help_Click"/>
		<Grid x:Name="helpPanel" Visibility="Collapsed">
			<Image Source="Res/helppanel.jpg"/>
			<Image x:Name="helpImage" Margin="53.3,79.4,302.3,104.6" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Stretch="Fill">
				<Image.RenderTransform>
					<CompositeTransform Rotation="-15"/>
				</Image.RenderTransform>
			</Image>
			<Button VerticalAlignment="Bottom" Height="93" BorderBrush="#56000000" Foreground="#FF121212" HorizontalAlignment="Right" Width="152" Background="#AC2D0602" Click="Back_Click" Margin="0,0,8,8">
				<Image Height="54" Source="Res/back.png" Stretch="Fill" Width="90"/>
			</Button>
		
		
		</Grid>
		<Grid x:Name="gameOver" Background="#7E000000" Opacity="0.995" Visibility="Collapsed">
			<Button x:Name="button" Content="Back to main menu" Margin="256,0,218,140" VerticalAlignment="Bottom" Click="GoBackMainMenu" Foreground="#FF232323" BorderBrush="White" Background="#02FFFFFF"/>
			<TextBlock x:Name="textBlock" TextWrapping="Wrap" Margin="173,170,135,0" TextAlignment="Center" FontSize="48" Height="68" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Foreground="#FF141414">
				<TextBlock.RenderTransform>
					<CompositeTransform/>
				</TextBlock.RenderTransform><Run Text="Game "/><Run Text="C"/><Run Text="omplete"/><Run Text=" "/><Run Text="!"/></TextBlock>
		</Grid>
		
		
	</Grid>
</phone:PhoneApplicationPage>